package com.zw.mizhe.view.fragment;

import android.os.Bundle;
import android.support.annotation.DrawableRes;
import android.widget.ImageView;

import com.zw.mizhe.R;
import com.zw.mizhe.common.base.BaseFragment;

import butterknife.BindView;

/**
 * Created by zhangwei on 16/10/22.
 */

public class GuideFragment extends BaseFragment {
    @BindView(R.id.guide_bg_iv)
    ImageView guideBgIv;

    public static final String PARMAS_ARGS_RES_ID = "resId";
    private int resId;


    public static GuideFragment newInstance(@DrawableRes int resId) {
        Bundle args = new Bundle();
        args.putInt(PARMAS_ARGS_RES_ID, resId);
        GuideFragment fragment = new GuideFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void initView() {
        if (getArguments() != null) {
            resId = getArguments().getInt(PARMAS_ARGS_RES_ID);
            guideBgIv.setImageResource(resId);
        }
    }

    @Override
    public void initData() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_guide;
    }


}
